package deployr.cli;

import java.io.*;

public class Result {

	private final int statusCode;
	private final String content;

	public Result(int statusCode) {
		this(statusCode, "");
	}

	public Result(int statusCode, String content) {
		this.statusCode = statusCode;
		this.content = content;
	}

	public int getStatus() {
		return statusCode;
	}

	public void writeTo(PrintWriter output) {
		output.print(content);
	}

	public String getContentType() {
		return "text/plain";
	}

	public int getSize() {
		return content.length();
	}
}

